home *** CD-ROM | disk | FTP | other *** search
- /*
- Copyright © 1994 Mikhail Fridberg. Part of this code is copyrighted by Steve Falkenburg
-
- Telnet-based talk server/client
- */
-
-
- #include "const.h"
- #include "globals.h"
- #include "utils.h"
- #include "interface.h"
- #include "network.h"
- #include "queues.h"
- #include "events.h"
-
- /* event handling routine for dispatching non-null events.
- we don't have much of a human interface, so we only handle
- mousedowns.
- */
-
- void HandleEvent(EventRecord *ev)
- {
- if (HandleDialogEvents(ev))
- return;
-
- switch (ev->what) {
- case mouseDown:
- HandleMouseDown(ev->where);
- break;
- }
- }
-
-
- /* event handling routine for null-events. this is where we check the queues
- to see if we have anything in the "completed" queue. if so, we call
- ProcessConnection with the queue element parameter block which we receive,
- and update our queue counter display.
- */
-
- void HandleIdleTime(EventRecord *ev)
- {
- MyQElemPtr pBlock;
-
- HandleDialogEvents(ev);
- UpdateNumberList();
-
- while (pBlock = GetCompletedPBlock()) {
- ProcessConnection(pBlock);
- }
-
- UpdateNumberList();
- }
-